const TOKEN_KEY = 'geek-app-87'

const getToken = () => localStorage.getItem(TOKEN_KEY)

const setToken = data => localStorage.setItem(TOKEN_KEY, JSON.stringify(data))

const removeToken = () => localStorage.removeItem(TOKEN_KEY)

// 判断是否登录
const isAuth = !!getToken()

export { getToken, setToken, removeToken, isAuth }